#ifndef _TYPES_H
#define _TYPES_H

typedef unsigned int   uint;
typedef unsigned short ushort;
typedef unsigned char  uchar;
typedef unsigned short wchar;

typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int  uint32;
typedef unsigned long uint64;

typedef int bool;
#define true 1
#define false 0

typedef unsigned long int	uintptr_t;
typedef long ssize_t;
typedef uint64 size_t;


#define NULL ((void *)0)

typedef uint64 pde_t;
typedef uintptr_t pte_t;
typedef size_t ppn_t;

#define to_struct(ptr, type, member)                               \
    ((type *)((char *)(ptr) - offsetof(type, member)))

#endif